//package com.fjl.tomcat;
//
//import org.springframework.web.SpringServletContainerInitializer;
//
//import javax.servlet.ServletContext;
//import javax.servlet.ServletException;
//import javax.servlet.http.HttpServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//import java.io.IOException;
//import java.util.Set;
//
//public class TulingSpringServletContainerInitializer extends SpringServletContainerInitializer {
//
//    @Override
//    public void onStartup(Set<Class<?>> webAppInitializerClasses, ServletContext servletContext) throws ServletException {
//
//        // 通过servletContext动态添加Servlet
//        servletContext.addServlet("spiServlet", new HttpServlet() {
//            @Override
//            protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
//                resp.getWriter().write("spiServlet--doGet");
//            }
//        }).addMapping("/spiServlet.do");
//
//    }
//}